package com.airbat.prize.modules.system.controller.area.vo;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;


/**
* 全国地区 Base VO，提供给添加、修改、详细的子 VO 使用
* 如果子 VO 存在差异的字段，请不要添加到这里，影响 Swagger 文档生成
*/
@Data
public class SysAreaBaseVO {

    @ApiModelProperty(value = "资源编号", required = true)
    @NotNull(message = "资源编号不能为空")
    private String code;

    @ApiModelProperty(value = "资源名称", required = true)
    @NotNull(message = "资源名称不能为空")
    private String name;

    @ApiModelProperty(value = "上级编号")
    private String parentCode;

    @ApiModelProperty(value = "区域等级", required = true)
    @NotNull(message = "区域等级不能为空")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long areaLevel;

    @ApiModelProperty(value = "经度")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long lng;

    @ApiModelProperty(value = "纬度")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long lat;

    @ApiModelProperty(value = "经纬度区域")
    private String areaRange;

}
